package com.hxh.exception.handler.service.impl;

import com.hxh.exception.handler.exception.CustomException;
import com.hxh.exception.handler.service.DemoService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;


@Service
@AllArgsConstructor
public class DemoServiceImpl implements DemoService {

    @Override
    public void serviceException() {
        throw new CustomException("-1", "service异常拦击");
    }

    @Override
    public void otherException() {
        throw new IllegalArgumentException("参数无效");
    }

}
